﻿using System;
using System.Windows.Controls;

namespace TMTemplate
{
	public partial class PageTransition : UserControl
	{
		public PageTransition()
		{
			InitializeComponent();
            VisualStateGroup.CurrentStateChanged += new System.EventHandler<System.Windows.VisualStateChangedEventArgs>(VisualStateGroup_CurrentStateChanged);
		}

        void VisualStateGroup_CurrentStateChanged(object sender, System.Windows.VisualStateChangedEventArgs e)
        {
            if (e.NewState.Name == "Empty") 
			{
				PageChange_wma.Position = TimeSpan.Zero;
				PageChange_wma.Play();
			}
        }
	}
}